<?php
if ( defined('ABSPATH') )
	include_once ABSPATH . 'config.php';
else
    include_once '../config.php';

include_once ABSPATH."base/people.php";

if(isset($_REQUEST["q"]))
{
	$q = $_REQUEST["q"];
}
if(isset($_REQUEST["page"]))
{
	$page = $_REQUEST["page"];
	
}
if(isset($_REQUEST["count"]))
{
	$count = $_REQUEST["count"];
}


$people = new People();

$rs = $people->Query($q, $page, $count);
$total = $people->Query($q, $page, $count, true);

if($rs)
{
	echo '<users total="'.$total.'">';
	 
	foreach($rs as $row)
	{
	    echo '<user><name><![CDATA['.$row["name"].']]></name><screen_name><![CDATA['.$row["screen_name"].']]></screen_name><address><![CDATA['.$row["address"].']]></address>';
	    echo '<profile_image_url><![CDATA['.$row["image"].']]></profile_image_url></user>';	
		
	}
	
	echo '</users>';
}
?>

